package org.jackysoft.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;
import org.jackysoft.util.MySqlSchema;
import org.joda.time.DateTime;


@Entity
@Table(name="OS_WFVARIABLE",schema=MySqlSchema.Businessbase)
public class Variable extends AbstractNoIdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final Variable  EMPTY_VARIABLE = new Variable();
	private Long entityId;
	private String name;
	private String value;
    private DateTime dateTime;
   
    
	

    //TODO 重新考虑变量问题的实现
	public Variable() {
	}

	public Variable(Long entityId ,String name,String value) {
		this.entityId = entityId;
		this.name = name;
		this.value = value;
	}

	public Variable(Long entityId ,String name,DateTime value) {
		this.entityId = entityId;
		this.name = name;
		this.dateTime = value;
	}
	
	@Id
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Id
	public Long getEntityId() {
		return entityId;
	}

	public void setEntityId(Long entityId) {
		this.entityId = entityId;
	}

	@Type(type = "jodatime")
	public DateTime getDateTime() {
		return dateTime;
	}

	public void setDateTime(DateTime dateTime) {
		this.dateTime = dateTime;
	}

}
